package com.woniuxy.cloud.carl.user.client;

import com.woniuxy.cloud.carl.user.client.param.GetByConditionParam;
import com.woniuxy.cloud.carl.user.client.result.UserDetailDto;
import com.woniuxy.cloud.carl.user.client.result.UserForStationDto;
import com.woniuxy.cloud.carl.user.client.result.WoniuPageDto;
import com.woniuxy.result.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.cloud.openfeign.SpringQueryMap;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(contextId = "userQueryClient",name="user",path="user")
public interface UserQueryClient {

    @GetMapping("userDetail")
    public Result<UserDetailDto> getUserDetail(@RequestParam("userId") Long userId);

    @GetMapping("byCondition")
    public Result<WoniuPageDto<UserForStationDto>> getByCondition(@SpringQueryMap GetByConditionParam param);
}
